﻿using Qins.PluginInterface;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Qins.PluginInterface
{
    public class Message
    {
        public MessageCommunication Send { get; set; }

        public MessageCommunication Receive { get; set; }

        public string SendMessage(string pluginName, MessageContent message)
        {
            return this.Send.Invoke(pluginName, message);
        }
    }

    public class MessageContent
    {
        public MessageConentTypeEnum messageType;
        public string content;
    }

    public enum MessageConentTypeEnum
    {
        DefaultType, 
        GetAllPlugin, 
        OpenUrl, 
        Run, 
        Log, 
        SetWindow,
        SetUserInfo,
        GetVersion
    }

    public delegate string MessageCommunication(string pluginName, MessageContent message);
}
